# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sshfs
pkgver=3.7.3
pkgrel=1
pkgdesc="FUSE client based on the SSH File Transfer Protocol"
url="https://github.com/libfuse/sshfs"
arch="all"
license="GPL-2.0-or-later"
depends="openssh-client fuse3"
makedepends="fuse3-dev glib-dev meson coreutils py3-docutils"
subpackages="$pkgname-doc"
source="https://github.com/libfuse/sshfs/releases/download/sshfs-$pkgver/sshfs-$pkgver.tar.xz"
options="!check" # requires FUSE kernel module to run tests

build() {
	abuild-meson . output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -Dm644 README.rst ChangeLog.rst AUTHORS COPYING \
		"$pkgdir"/usr/share/doc/$pkgname/

	mkdir -p "$pkgdir"/sbin
	ln -s /usr/sbin/mount.sshfs "$pkgdir"/sbin/mount.sshfs
}

sha512sums="
ba0928f85819984a3eb83d2debab658b2cd4e958ed1c3ba9787e361f452687d42b82d478b7d95e7a7c5580bae5c1cdebe4cf3c9b6cb5eb6a570311f276903d99  sshfs-3.7.3.tar.xz
"
